import React from 'react'
import ReactDOM from 'react-dom'
import {Provider} from 'react-redux'


/*HashRouter*/
// import {BrowserRouter} from 'react-router-dom'

// 初始化样式
import "./index.css"


// import App from './components/app_todolist/app'
// ReactDOM.render(<App/>,document.getElementById('root'))

// import Suser from './components/search_user/suser'
// ReactDOM.render(<Suser/>,document.getElementById('root'))

//router
// import App from './components/router_test/app'
// ReactDOM.render(
//   (
//   <BrowserRouter>
//   <App/>
//   </BrowserRouter> 
//   ),
//   document.getElementById('root')
// )


// import App from './components/redux_compare1/app'
//redux 比较
// function render() {
  // ReactDOM.render(<App store={store}/>,document.getElementById('root'))
  // }
// render()
// store.subscribe(render)

//Provider 有了react-redux 后不在需要之前的
// import App from './components/redux_compare1/counter'
// import store from './redux/store'
// ReactDOM.render((
//   <Provider store={store}>
//     <App/>
//   </Provider>
// ),document.getElementById('root'))

import App from './containers/app'
import store from './redux/store'
ReactDOM.render((
  <Provider store={store}>
   <App/>
  </Provider>
),document.getElementById('root'))


// 这是使用pubsub-js库改造的通信机制
// import Suser from './components/pubsubJs_user/suser'
// ReactDOM.render(<Suser/>,document.getElementById('root'))
// import App from './components/pubsubJs_app_todolist/app'
// ReactDOM.render(<App/>,document.getElementById('root'))